package com.discuz.tools;

import java.io.File;

public class FileTools {

	public static void main(String[] args) {
		
		rename("b","d:/t");
	}
	
	public static void rename(String rename,String path){
		File [] fs = new File(path).listFiles();
		int index = 1;
		for(File f:fs){
			String name = f.getName();
			String rname = index+"-" + name;
			f.renameTo(new File(f.getAbsolutePath().replaceAll(name,rname)));
			index++;
		}
	}
	
	
}
